require 'rexml/document'
xml_data = File.read('/etc/cloud/parameters.was.done')
params = REXML::Document.new(xml_data)
wasuser = params.root.elements["field[@name='WASAdminUser']/values/value"].text
wasuserpw = params.root.elements["field[@name='WASAdminPassword']/values/value"].text